package cn.csust.net2.manager.shared.po;

import java.io.Serializable;

import cn.csust.net2.manager.shared.util.ClassForNameAble;
import cn.csust.net2.manager.shared.vo.TreeNode;
import cn.csust.net2.manager.shared.xml.XmlInfo;
import cn.csust.net2.manager.shared.xml.XmlResources;

import com.extjs.gxt.ui.client.data.BeanModelTag;

@ClassForNameAble
public class Major extends PO implements Serializable,BeanModelTag,TreeNode {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private static String DISPLAYNAME = "majorName";
	private Integer majorID;
	private String majorName;
	private String remark;
	private Academy academy;

	public Integer getMajorID() {
		return majorID;
	}

	public void setMajorID(Integer majorID) {
		this.majorID = majorID;
	}

	public String getMajorName() {
		return majorName;
	}

	public void setMajorName(String majorName) {
		this.majorName = majorName;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Academy getAcademy() {
		return academy;
	}

	public void setAcademy(Academy academy) {
		this.academy = academy;
	}

	@SuppressWarnings("rawtypes")
	@Override
	public Class getSelf() {
		// TODO Auto-generated method stub
		return Major.class;
	}

	@SuppressWarnings("rawtypes")
	@Override
	public Class[] getChildren() {
		// TODO Auto-generated method stub
		return new Class []{Banji.class};
	}

	@Override
	public String getNodeId() {
		// TODO Auto-generated method stub
		return this.getMajorID().toString();
	}

	@Override
	public String getNodeName() {
		// TODO Auto-generated method stub
		return this.getMajorName();
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return this.getMajorName();
	}

	@Override
	public XmlInfo getXmlInfo(XmlResources instance) {
		// TODO Auto-generated method stub
		XmlInfo xmlInfo = new XmlInfo();
		xmlInfo.setTextResource(instance.major());
		return xmlInfo;
	}

	@Override
	public String getDisplayName() {
		// TODO Auto-generated method stub
		return DISPLAYNAME;
	}

	@Override
	public String getNodeIdName() {
		// TODO Auto-generated method stub
		return "majorID";
	}
	

}
